package top.vanchor.flexible.service.impl;

import top.vanchor.flexible.entity.ResourcePath;
import top.vanchor.flexible.mapper.ResourcePathMapper;
import top.vanchor.flexible.service.IResourcePathService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Ding
 * @since 2022-08-07
 */
@Service
public class ResourcePathServiceImpl extends ServiceImpl<ResourcePathMapper, ResourcePath> implements IResourcePathService {

    @Override
    public int toAddItem(ResourcePath ruralResource) {
        ruralResource.setCreateTime(new Date());
        ruralResource.setUpdateTime(new Date());
        return baseMapper.insert(ruralResource);
    }
}
